package com.events
{
	public class DeductionDate
	{
		
		[Bindable]
		private var thisDay:Date;
		
		[Bindable]
		public var dayQ:Number;
		
		[Bindable]
		private var monthQ:Number;
		
		private var monthQLong:Array ;
		
		[Bindable]
		public var monthLong:String ;
		
		[Bindable]
		public var yearQ:String ;
		
		[Bindable]
		
		public function get previousMonth():String
		{
			var result:String;
			if(monthQ == 0)
			{
				result = monthQLong[11];
			}
			else
			{
				result = monthQLong[monthQ-1];
			}
			return (result);
		}
		
		private function set previousMonth(value:String):void
		{
			//			
		}

		public function DeductionDate():void
		{
			thisDay = new Date();
			dayQ = thisDay.date;
			monthQ =thisDay.month;
			monthQLong = new Array("січня","лютого","березня",
				"квітня","травня","червня","липня","серпня","вересня",
				"жовтня","листопада","грудня");
			monthLong = monthQLong[monthQ];
			yearQ = thisDay.fullYear.toString();
			
		}
	}
}
